1. Field of the Invention
The present invention relates to an automatic trimming method and apparatus for automatically trimming, based on a face of a specific person, a whole image obtained by a digital camera or the like. The present invention also relates a program for the automatic trimming method and apparatus.
2. Description of the Related Art
A trimming method for producing a certificate photograph that is used to apply for a passport or a license or to prepare a resume or the like is well known. In the trimming method, a face in an image is enlarged or reduced to satisfy a standard for the certificate photograph, and trimming is performed so that the face is arranged at a predetermined position in the certificate photograph. Particularly, as techniques for detecting a face, eye or the like in a photograph image have been improved, an automatic trimming method has been proposed (for example, please refer to Japanese Unexamined Patent Publication No. 2005-267454). In the automatic trimming method, trimming is performed by detecting a face in a photograph image obtained by using a digital camera or the like and by setting a trimming area based on the detected face. In Japanese Unexamined Patent Publication No. 2005-267454, first, human faces are detected in a photograph image. Then, the position and size of a trimming area is set based on the position of each of the detected faces. Then, trimming is automatically performed based on the trimming area that includes all of the faces.
As described above, in Japanese Unexamined Patent Publication No. 2005-267454, a trimming frame is set by paying attention only to facial images. However, if a trimming frame is set by paying attention only to the facial images, there is a problem that even if a photographer thinks that the background of a photograph is a subject that is as important as a person or persons in the photograph, the background, in which the photographer has interest, is excluded from an image obtained by trimming in some cases. For example, the photographer thinks that the background is as important as a person when the photographer obtains a photograph of the person with a landmark, such as a castle, in the background.